<!--
 * @Description: 垂直居中
 * @Author: charles
 * @Date: 2021-08-19 11:13:25
 * @LastEditors: charles
 * @LastEditTime: 2021-08-19 11:32:54
-->
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>垂直居中</title>
  <style>
    .box {
      background-color:cornflowerblue;
      color: #fff;
      margin-bottom: 1em;
    }
  </style>
</head>
<body>
  <div class="box"> 
    <input type="text">
    <span>sphigx</span>
    <span>中国话</span>
    <button>按钮</button>
    <img src="../day08/images/cat.jpg" alt="">
  </div>

  <div class="box"> 
    <span>sphinx</span>
    <img src="../day08/images/cat.jpg" style="vertical-align: middle;" alt="" ">
  </div>

  <div class="box"> 
    <img src="../day08/images/cat.jpg" alt="" style="display: block;">
  </div>
  <div class="box" style="font-size: 0;"> 
    <img src="../day08/images/cat.jpg" alt="" ">
  </div>
</body>
</html>